//
//  SYChannelController.m
//  MicroNews
//
//  Created by tongcheng on 15/10/27.
//  Copyright © 2015年 siyue. All rights reserved.
//

#import "SYChannelController.h"
#import "SYChannel.h"

@interface SYChannelController()



@end

@implementation SYChannelController

#pragma mark - 懒加载新闻数据
//- (NSArray *)arrayLists
//{
//    if (_arrayLists == nil) {
//        _arrayLists = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"WD.plist" ofType:nil]];
//        //        _arrayLists = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"NewsURLs.plist" ofType:nil]];
//    }
//    return _arrayLists;
//}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
   
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    UIApplication *app = [UIApplication sharedApplication];
    app.statusBarStyle = UIStatusBarStyleDefault;
    
    SYChannel *channel = [[SYChannel alloc] init];
    [channel setupView:self.arrayChannel];
    
//    [self.view addSubview:channel];
    self.view = channel;
    
     self.view.backgroundColor = [UIColor whiteColor];
    
    [self requestChannel];
    
}

-(void)viewWillAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    
    [self.navigationController setNavigationBarHidden:NO animated:YES];
    
    
}


-(void)requestChannel
{
    
    NSString *url =  SYNSString(@"%@%@",WDURL,WDGetarticleclass);
    
    [[NetworkInterface shareInstance] requestForGet:url complete:^(NSDictionary *result){
        NSLog(@"-->requestChannel--------》%@",result);
        
        
    } error:^(NSError *error){
    }];
    
    
}

@end
